package com.cyl.h5.controller;

import com.cyl.h5.service.H5FhInfoSigncontentService;
import com.cyl.manager.act.domain.convert.FhInfoSigncontentConvert;
import com.cyl.manager.act.domain.entity.FhInfoSigncontent;
import com.cyl.manager.act.domain.query.FhInfoSigncontentQuery;
import com.cyl.manager.act.domain.vo.FhInfoSigncontentVO;
import com.cyl.manager.act.service.FhInfoSigncontentService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 签到公告表Controller
 *
 * @author zcc
 * @date 2025-09-24
 */
@Api(description ="签到公告表接口列表")
@RestController
@RequestMapping("/app/fhInfoSigncontent")
public class H5FhInfoSigncontentController extends BaseController {
    @Autowired
    private H5FhInfoSigncontentService service;

    @ApiOperation("查询签到公告表列表")
    @PostMapping("/list")
    public ResponseEntity<Page<FhInfoSigncontent>> list(@RequestBody FhInfoSigncontentQuery query, Pageable page) {
        List<FhInfoSigncontent> list = service.selectList(query, page);
        return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
    }

    @ApiOperation("获取签到公告表详细信息")
    @GetMapping(value = "/{id}")
    public ResponseEntity<FhInfoSigncontent> getInfo(@PathVariable("id") Integer id) {
        return ResponseEntity.ok(service.selectById(id));
    }

}
